home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / misc / wclass20.zip / POETHEAD.SCT < prev    next >
Text File  |  1995-01-16  |  5KB  |  142 lines

  1. // Class: CLASS         POET
  2. // Indicate persistent classes in class specification form
  3. // Script enhancements requested 71162.755@compuserve.com
  4.  
  5. #ifndef __$TRUNCATE_EIGHT$CLASS$_H  //Required for current class
  6.   #define __$TRUNCATE_EIGHT$CLASS$_H
  7.  
  8. [                //Required for base classes
  9. #ifndef __$TRUNCATE_EIGHT$BASE_CLASS$_H
  10.   #include "TRUNCATE_EIGHT$BASE_CLASS$.h"
  11. #endif
  12. ]                
  13.                 
  14. [#include <INCLUDE_FILE>    //Required for include files
  15. ]                  
  16.  
  17. [                //Required for 1:1 associated classes
  18. #ifndef __$TRUNCATE_EIGHT$ASSOCIATION_ONE_CLASS$_H
  19.   #include "TRUNCATE_EIGHT$ASSOCIATION_ONE_CLASS.h"
  20. #endif
  21. ]                                
  22.  
  23. [                //Required for 1:1 aggregation (part) classes
  24. #ifndef __$TRUNCATE_EIGHT$AGGREGATION_ONE_CLASS$_H
  25.   #include "TRUNCATE_EIGHT$AGGREGATION_ONE_CLASS$.h"
  26. #endif
  27. ]                                
  28.  
  29. [                //Required for 1:M associated classes
  30. #ifndef __$TRUNCATE_EIGHT$ASSOCIATION_MANY_CLASS$_H
  31.   #include "TRUNCATE_EIGHT$ASSOCIATION_MANY_CLASS$.h"
  32. #endif
  33. ]                                
  34.  
  35. [                //Required for 1:M aggregation (part) classes
  36. #ifndef __$TRUNCATE_EIGHT$AGGREGATION_MANY_CLASS$_H
  37.   #include "TRUNCATE_EIGHT$AGGREGATION_MANY_CLASS$.h"
  38. #endif
  39. ]
  40.             
  41. CLASS_PERSISTENT class CLASS[NO_RETURN NO_REPEAT: NO_REPEAT public BASE_CLASS ,DELETE_LAST_SYMBOL] CLASS_LIBRARY_BASE_CLASS     
  42. { [ATTRIBUTE_TYPE ATTRIBUTE_NAME$;]
  43.   [ASSOCIATION_ONE_CLASS$* ASSOCIATION_ONE_NAME$;]
  44.   [AGGREGATION_ONE_CLASS AGGREGATION_ONE_NAME$;]
  45.   [ASSOCIATION_MANY_CLASS$* ASSOCIATION_MANY_NAME LITERAL_SYMBOL[6 LITERAL_SYMBOL];]
  46.   [AGGREGATION_MANY_CLASS AGGREGATION_MANY_NAME LITERAL_SYMBOL[6 LITERAL_SYMBOL];]
  47.  
  48. public:
  49.             //Default constructor
  50.             //Update to access base class attributes 
  51.             //Update to access 1:1 part class attributes 
  52.             //Update to access 1:M part class attributes
  53.             //Update to access 1:1 associated class attributes
  54.             //Update to access 1:M associated class attributes
  55.              //Ensure initial values entered
  56.   CLASS () :[NO_RETURN ATTRIBUTE_NAME(ATTRIBUTE_INITIAL_VALUE),DELETE_LAST_SYMBOL]  { } 
  57.  
  58.             //Constructor with arguments
  59.   CLASS ([NO_RETURN ATTRIBUTE_TYPE a$ATTRIBUTE_NAME,DELETE_LAST_SYMBOL] )    
  60.   : [NO_RETURN ATTRIBUTE_NAME (a$ATTRIBUTE_NAME),DELETE_LAST_SYMBOL] { }    
  61.             
  62.   
  63.             //Copy constructor
  64.             //Update to access 1:M part class attributes
  65.             //Update to access 1:1 associated class attributes
  66.             //Update to access 1:M associated class attributes     
  67.   CLASS (const CLASS$& a$CLASS ) [NO_RETURN NO_REPEAT: BASE_CLASS (a$CLASS),DELETE_LAST_SYMBOL]
  68.   { [  ATTRIBUTE_NAME = a$CLASS$.$ATTRIBUTE_NAME;]
  69.     [AGGREGATION_ONE_NAME = a$CLASS$.$AGGREGATION_ONE_NAME;]        
  70.   }                    
  71.  
  72.             //Operator= Assignment Operator
  73.             //Update to access 1:M part class attributes
  74.             //Update to access 1:1 associated class attributes
  75.             //Update to access 1:M associated class attributes     
  76.   CLASS operator= (const CLASS$& a$CLASS)
  77.   { if (this == &a$CLASS) return *this;         
  78.   [BASE_CLASS$::operator= (a$CLASS);]
  79.   [ATTRIBUTE_NAME = a$CLASS$.$ATTRIBUTE_NAME;]
  80.   [AGGREGATION_ONE_NAME = a$CLASS$.$AGGREGATION_ONE_NAME;]    
  81.   return *this;                                                    
  82.   }                    
  83.  
  84.             //Operator== Equality Operator
  85.             //Update to access 1:M part class attributes
  86.             //Update to access 1:1 associated class attributes
  87.             //Update to access 1:M associated class attributes     
  88.   int operator== (const CLASS$& a$CLASS)
  89.   { return (
  90. [  (BASE_CLASS$::operator== (a$CLASS)) &&]
  91. [  (AGGREGATION_ONE_NAME == a$CLASS$.$AGGREGATION_ONE_NAME) &&]
  92. [  (ATTRIBUTE_NAME == a$CLASS$.ATTRIBUTE_NAME) &DELETE_LAST_SYMBOL&DELETE_LAST_SYMBOL]
  93.   );
  94.   }                
  95.  
  96. [              //Get accessor function for attribute
  97.   ATTRIBUTE_TYPE get$ATTRIBUTE_NAME$() const
  98.   {return ATTRIBUTE_NAME$;
  99.   }
  100. ]            
  101.             
  102. [              //Set accessor function for attribute
  103.   void set$ATTRIBUTE_NAME ($ATTRIBUTE_TYPE a$ATTRIBUTE_NAME$)
  104.   { ATTRIBUTE_NAME = a$ATTRIBUTE_NAME$;
  105.   }
  106. ]            
  107.  
  108. [              //Get accessor function for 1:1 aggregation
  109.   AGGREGATION_ONE_CLASS$& get$AGGREGATION_ONE_NAME$() 
  110.   {return AGGREGATION_ONE_NAME$;
  111.   }
  112. ]            
  113.             
  114. [              //Set accessor function for 1:1 aggregation
  115.   void set$AGGREGATION_ONE_NAME ($AGGREGATION_ONE_CLASS$& a$AGGREGATION_ONE_NAME$)
  116.   { AGGREGATION_ONE_NAME = a$AGGREGATION_ONE_NAME$;
  117.   }
  118. ]            
  119.  
  120. [              //Get accessor function for 1:1 association
  121.   ASSOCIATION_ONE_CLASS$* get$ASSOCIATION_ONE_NAME$() const
  122.   {return ASSOCIATION_ONE_NAME$;
  123.   }
  124. ]            
  125.             
  126. [              //Set accessor function for 1:1 association
  127.   void set$ASSOCIATION_ONE_NAME ($ASSOCIATION_ONE_CLASS$* a$ASSOCIATION_ONE_NAME$)
  128.   { ASSOCIATION_ONE_NAME = a$ASSOCIATION_ONE_NAME$;
  129.   }
  130. ]
  131.         
  132. [  CPP_OPERATION_VIRTUAL CPP_OPERATION_STATIC OPERATION_RETURN_TYPE OPERATION_NAME (CPP_OPERATION_PARAMETERS) CPP_OPERATION_CONSTANT CPP_OPERATION_PURE_VIRTUAL;
  133.  
  134.   ~ CLASS ( ) { }    //Destructor
  135. };
  136.  
  137. #endif
  138.  
  139.  
  140.  
  141.